from django.db import models

# Create your models here.

class pictures(models.Model):
    name = models.CharField(max_length=64, verbose_name='名称')
    # imgs = models.ImageField(verbose_name='图片', upload_to='img/%Y/%m') #指定一个文件夹用来存储上传的图片，该文件夹会自动创建
    imgs = models.ImageField(upload_to='img')  # 本次使用的是这个

    def __str__(self):
        return self.name

    class Meta:
        verbose_name_plural = '图片存储'